package Thread;
 class MyRunnable implements Runnable{
    @Override
    public void run() {
        System.out.println("实现Runnable接口,重新run()");
    }
}
public class ThreadDemo2 {
    public static void main(String[] args) {
        //Runnable要搭配thread使用,作为thread的参数
        Thread t=new Thread(new  MyRunnable());
        System.out.println("第二种方法:");
        t.start();
    }
}
